import api from '../../server/api';

const state = {
    hall:[],
    hkey:[],
    hkeyone:[]
}

const getters = {}

const actions = {
    LoadKeyData({ commit }){
        api.LoadDataBySearchHot({
            platform:"H5",
            code:"hotWord,sketch"
        })
        .then(( {data} )=>{
            commit("setHkey",data.hotWord.data); 
            commit("setHkeyone",data.sketch.data.query);  
        })
    }
}
    

const mutations = {
    setHall(state,data){
        state.hall = data
    },
    setHkey(state,data){
        state.hkey = data
    },
    setHkeyone(state,data){
        state.hkeyone = data
    }
   
    
}

export default {
    state,
    actions,
    mutations,
    getters
}
